<!doctype html>
<html lang="zh-CN">
<head>
	<link type="text/css" media="ALL" href="<?php $_SERVER['DOCUMENT_ROOT']?>/jquery-ui-1.8.custom/css/smoothness/jquery-ui-1.8.custom.css" rel="stylesheet" />	
	<link type="text/css" media="ALL" href="<?php $_SERVER['DOCUMENT_ROOT']?>/css/main.css" rel="stylesheet" />	
	<script type="text/javascript">
	function print() {
		win = window.open("<?php $_SERVER['DOCUMENT_ROOT']?>/print/print","1","top=0,left=0,Location=no,Toolbar=no,status=no,menubar=no");
	}
	</script>
</head>
<body>

<div id="container">
<!--公司名称-->
<table>
  <tr>
  	<td style="width:20%"></td>
	<td id="company_name" style="text-align:center">
	  上海旷诚钢铁贸易有限公司
	</td>
	<td id="deliveryorder_number" style="text-align:right;width:20%">
		No.<?php echo $this->do->get_serialNumber() ?>
	</td>
  </tr>
</table>
<!--end of 公司名称-->


<table>
  <tr>
	<td style="text-align:left;">
		公司地址：上海杨浦区逸仙路889号钢市交易区1380室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;销售热线： （021）65174717&nbsp;&nbsp;&nbsp;&nbsp;13381777281</p>
	</td>
	<td style="text-align:right;">
		开单日期: <?php echo $this->do->get_createDate() ?>
		有效日期:<?php echo $this->do->get_expireDays() ?> 天
	</td>
  </tr>
</table>


<!--end of header-->

<!--购货单位-->
<div id="customer">
  <table class="infotable">
	  <tr>
	   <td class="label" rowspan="2" style="width:50px;">购&nbsp;货<br>单&nbsp;位</td>
	   <td class="label" style="width:80px;">名称</td>
	   <td style="width:30%;"><?php echo $this->customer->get_name() ?></td>
	   <td class="label" style="width:100px;">税号</td>
	   <td id="taxId"><?php echo $this->customer->get_taxId() ?></td>
	  </tr>
	  <tr>
	   <td class="label" style="width:20px;">地址、电话</td>
	   <td style="width:30%;"><?php echo $this->customer->get_address() ?>&nbsp;/&nbsp;<?php echo $this->customer->get_phone() ?></td>
	   <td class="label" style="width:20px;">开户行、账号</td>
	   <td><?php echo $this->customer->get_bank() ?>&nbsp;/&nbsp;<?php echo $this->customer->get_account() ?></td>
	  </tr>
  </table>
</div>
<!--end of 购货单位-->

<!--清单-->
<div id="deliveryorder_detail">
  <table class="infotable">
    <tr>
     <td class="label" >品名</td>
     <td class="label">规格</td>
     <td class="label">支数、件数</td>
     <td class="label">实发数量</td>
     <td class="label">单价（元/吨）</td>
     <td class="label">结算金额</td>
     <td class="label" style="width:30%">备注说明</td>
    </tr>
    <?php 
    $i = 0;
    foreach ($this->dod as $entry): 
    ?> 
	<tr>	 
     <td><?php echo $entry->get_steelId() ?></td>
     <td><?php echo $entry->get_specs() ?></td>
     <td><?php echo $entry->get_amount() ?></td>
     <td><?php echo $entry->get_weight() ?></td>
     <td><?php echo $entry->get_price() ?></td>
     <td><?php echo $entry->get_subtotal() ?></td>
     <td><?php echo $entry->get_note() ?></td>
    </tr>
    <?php 
    $i = $i + 1;
    endforeach;
	for ($j = $i; $j < 5; $j = $j+1 ) {
		if($j == $i) {
	?>
	
	<tr>	 
     <td>--以下空白--</td>
     <td>--以下空白--</td>
     <td>--以下空白--</td>
     <td>--以下空白--</td>
     <td>--以下空白--</td>
     <td>--以下空白--</td>
     <td>--以下空白--</td>
    </tr>
    <?php } else {?>
	<tr>	 
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
    </tr>
   <?php }} ?>
    
	<tr>
     <td class="label">
     	合计（人民币大写）:     	
     </td>
     <td colspan="4" id ="totalRmb" >
	     <script type="text/javascript">
	   		document.write(toRmb(<?php echo $this->do->get_total() ?>));
		 </script>
     </td>
     <td id="total"><?php echo $this->do->get_total() ?></td>
	 <td></td>
    </tr>  
  </table>
  <table>
    <tr>
     <td width="80" class="label">结算方式</td>
     <td width="80">
      <select name="settlementMode">
        <OPTION value="1">现金</OPTION>
        <OPTION value="2">支票</OPTION>
        <OPTION value="0">其他</OPTION>
       </select>
     </td>
     <td width="80" class="label">发票</td>
     <td width="80">
      <select name="invoiceStatus">
        <OPTION value="1">未开</OPTION>
        <OPTION value="2">已开</OPTION>
       </select>
     </td>
     <td width="80" class="label">发货仓库</td>
     <td with="100%"><select name="entrepot"></select></td>
    </tr>
  </table>
</div>
<!--end of 清单-->

<!--条款等-->
<div id="a">
  <table class="infotable">
	  <tr>
		<td class="label">条<br>款<br>说<br>明</td>
		<td style="font-size:80%;">
		1.本提单需加盖本单位指定章有效，未经本单位同意涂改一律无效。<br>
		2.提单遗失，及时报知，如货已出库领单人自负。<br>
		3.提货时看清规格，品种，数量及表面质量，出库后一概不负责任。<br>
		4.提货前请与仓库联系，以便安排发货，否则由此造成损失由需方单位承担。<br>
		5.产品如质量异议，请在五天内书面提出，否则不予受理。<br>
		6.在规定时间内，客户须将货物提清，越期本单位加收15%仓储费，<br>&nbsp;越过一个月本单位有权对货物处理。
		</td>
		<td class="label">需<br>方<br>单<br>位</td>
		<td style="height:120px;width:120px;">
			<br>
			<div style="text-align:center;">(章)</div>
			<br>
			<br>
			<br>
			<br>
			签字<span style="text-decoration:underline;">
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			   </span>
		</td>
		<td class="label" >供<br>方<br>单<br>位</td>

		<td style="height:120px;width:120px;">
			<br>
			<div style="text-align:center;">(章)</div>
			<br>
			<br>
			<br>
			<br>
			签字<span style="text-decoration:underline;">
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			   </span>
			</td>
	  </tr>
  </table>
</div>
<!--end of 条款等-->

<div id="footer">
<p>红色：客户联，蓝色：存根联，白色：记账联</p>
</div>

</div> <!--end of container-->


<div style="text-align:center">
<input onclick="javascript:print();" type="button" value="打印提货单"/> 
</div>

</body>
</html>
